package com.ruoyi.shop.modules.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 商品评价对象 prd_comment
 *
 * @author zjc
 * @date 2024-07-02
 */
@EqualsAndHashCode(callSuper = true)
@Data
public class Comment extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long id;

    /**
     * 商品id
     */
    @Excel(name = "商品id")
    private Long productId;

    /**
     * 会员昵称
     */
    @Excel(name = "会员昵称")
    private String memberNickName;

    /**
     * 商品名
     */
    @Excel(name = "商品名")
    private String productName;

    /**
     * 评价星数
     */
    @Excel(name = "评价星数")
    private Long star;

    /**
     * 评价的ip
     */
    @Excel(name = "评价的ip")
    private String memberIp;

    /**
     * 所在城市
     */
    @Excel(name = "所在城市")
    private String ipCity;

    /**
     * 是否展示
     */
    @Excel(name = "是否展示")
    private Long showStatus;

    /**
     * 购买时的商品属性
     */
    @Excel(name = "购买时的商品属性")
    private String productAttribute;

    /**
     * 浏览数
     */
    @Excel(name = "浏览数")
    private Long readCount;

    /**
     * 评论内容
     */
    @Excel(name = "评论内容")
    private String content;

    /**
     * 上传图片地址，以逗号隔开
     */
    @Excel(name = "上传图片地址，以逗号隔开")
    private String pics;

    /**
     * 评论用户头像
     */
    @Excel(name = "评论用户头像")
    private String memberIcon;

    /**
     * 回复数
     */
    private Long replayCount;


    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("productId", getProductId())
                .append("memberNickName", getMemberNickName())
                .append("productName", getProductName())
                .append("star", getStar())
                .append("memberIp", getMemberIp())
                .append("createTime", getCreateTime())
                .append("ipCity", getIpCity())
                .append("showStatus", getShowStatus())
                .append("productAttribute", getProductAttribute())
                .append("readCount", getReadCount())
                .append("content", getContent())
                .append("pics", getPics())
                .append("memberIcon", getMemberIcon())
                .append("replayCount", getReplayCount())
                .toString();
    }
}
